import request from '@/utils/request'

// 查询aliPay列表
export function listAliPay(query) {
  return request({
    url: '/system/aliPay/list',
    method: 'get',
    params: query
  })
}

// 查询aliPay详细
export function getAliPay(configId) {
  return request({
    url: '/system/aliPay/' + configId,
    method: 'get'
  })
}

// 新增aliPay
export function addAliPay(data) {
  return request({
    url: '/system/aliPay',
    method: 'post',
    data: data
  })
}

// 修改aliPay
export function updateAliPay(data) {
  return request({
    url: '/system/aliPay',
    method: 'put',
    data: data
  })
}

// 删除aliPay
export function delAliPay(configId) {
  return request({
    url: '/system/aliPay/' + configId,
    method: 'delete'
  })
}

export function selectMainConfig() {
  return request({
    url: '/system/aliPay/selectMainConfig',
    method: 'get'
  })
}
export function toPayAsPC(data) {
  return request({
    url: '/pay/ali/pc',
    method: 'post',
    data: data
  })
}
